package com.allwees.bs.module.oms.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.allwees.bs.core.modelbase.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import java.math.BigDecimal;

/**
 * 结算单基类
 *
 * @author yangylsky
 * @since 2019-12-31
 *
 */
@Data
@ToString
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
public abstract class FmsBaseAccount extends BaseEntity {

	@Column(length = 48)
	protected String branchUuid;

	/**
	 * 帐号
	 */
	@Column(length = 32)
	protected String accountNo;

	/**
	 * 余额
	 */
	@Column(precision = 10, scale = 2)
	protected BigDecimal balance  = BigDecimal.ZERO ;

	@Column(length = 4)
	protected String currency;

	/**
	 * 绑定手机
	 */
	@Column(length = 15)
	private String mobile;

	/**
	 * 提现密码
	 */
	@JsonIgnore
	@JSONField(serialize = false)
	private String withdrawPassword;

}
